<?php

/*---------------------------------------------------------------------------
 * Please, don't touch this file.
 *
 * If you need to custom this Class, you can edit user.php
 * file overwrite and define new methods
 *---------------------------------------------------------------------------
 */

/**
 * 
 *
 * @Authors Gonzalez Federico, Viera Leonel 
 * @package mailing
 * @subpackage model
 *
 * 
 */
class User_protoweb extends Protoweb_models {
  public $table      = "users";
  public $model      = "user";
  public $has_many   = array('permission');
  public $has_one    = array();
  public $validation = array(
    'username' => array(
      'label' => 'User Name',
      'rules' => array('trim', 'required', 'unique')      
    ),
    'password' => array(
      'label' => 'Password',
      'rules' => array('trim', 'required', 'sha1')
          
    ),
    'lastname' => array(
      'label' => 'Lastname',
      'rules' => array('trim', 'required')
          
    ),
    'firstname' => array(
      'label' => 'Firstname',
      'rules' => array('trim', 'required')
          
    ),
    'email' => array(
      'label' => 'Email',
      'rules' => array('trim', 'required', 'valid_email', 'unique')
          
    ),
    'phone' => array(
      'label' => 'Phone(s)',
      'rules' => array('trim')
          
    ),
    'validationdate' => array(
      'label' => 'Validation Date',
      'rules' => array('valid_date')
          
    ),
    'activationcode' => array(
      'label' => 'Activation Code',
      'rules' => array()
    )
  ); // $validation
  

  public function __construct($id = NULL) {
    parent::__construct($id);
  } // end of method __construct($id = NULL)

} // Class User_protoweb

/* End of file User_protoweb.php */
/* Location: ./system/application/models/User_protoweb.php */